var topHeight = mui("header")[0].offsetHeight + "px";
mui.init();

window.addEventListener("reloadView", function() {
	location.reload();
})


mui.plusReady(function() {
	var self = plus.webview.currentWebview();
    var cacheData=self.cacheData;
	var subpages = ["ycllogcat/ycllogcat.html","dcllogcat/dcllogcat.html"];
	var subpageIds = ["ycllogcat.html","dcylogcat.html"];
	mui.each(subpages, function(i, item) {
		var sub = plus.webview.create(
			subpages[i], //子页url
			subpageIds[i], //子页id
			{
				top: topHeight, //设置距离顶部的距离
				bottom: '0px'
			}, {
				"cacheData": cacheData
			}
		);
		self.append(sub);
	})

	mui("#div_title").on("tap", "a", function() {
		if(this.classList.contains("mui-active")) {
			return;
		}
		var index = this.getAttribute("index");
		plus.webview.show(subpageIds[index]);
	});
	/*
	 * 添加日志
	 */
	$(".mui-icon-plusempty").on("tap",function(){
		jumpTo("newevent/newevent.html","newevent.html",jumpOptionFadein,{
			
		})
	})
	
})